#include "iBe.h"

StringHash::StringHash()
{
  hash[0] = hash[1] = 0;
}

StringHash::~StringHash()
{}

bool StringHash::operator==(const StringHash &_val) const
{
  if ( hash[0] == _val.hash[0] && hash[1] == _val.hash[1] )
    return true;
  else
    return false;
}

bool StringHash::operator<(const StringHash &_val) const
{
  if ( hash[0] < _val.hash[0] )
    return true;
  else if ( hash[0] > _val.hash[0] )
    return false;
  else
    return ( hash[1] < _val.hash[1] );
}
    
StringHash::operator bool() const
{
  return ((hash[0] == 0) && (hash[1] == 0));
}

void StringHash::reset()
{
  hash[0] = hash[1] = 0;
}
